package com.xjprojectc.business.action;

import java.util.List;

import net.sf.json.JSONObject;

import com.xjprojectc.base.action.SysBaseAction;
import com.xjprojectc.business.pojo.T_mobile;
import com.xjprojectc.business.service.MobileService;
import com.xjprojectc.webservice.Call;

/**
 * 
 * 
 * 号段管理
 * 
 * @author Administrator
 * 
 */

@SuppressWarnings("serial")
public class MobileAction extends SysBaseAction {
	private MobileService mobileService;
	private T_mobile mobile;
	private List<T_mobile> mobileList;
	private String errorMsg;
	private String msg;

	private String mobilenumber;

	public String queryMobile() {
		if(mobilenumber != null){
			JSONObject obj = new JSONObject();
			obj.put("user", Call.setCallUser(this.getSysUser()));
			obj.put("data", mobilenumber);
			try {
				String result = Call.getCall().exMobilenumber(obj.toString());
				this.jsonOut(result);
			} catch (Exception e) {
				if(e.getMessage().trim().equals("Could not send Message")){
					try {
						this.jsonOut("{'success':'false','data':'操作失败，远程服务器连接异常！'}");
					} catch (Exception e1) {
						e1.printStackTrace();
					}
				}
			}
		}
		return NONE;
	}

	public MobileService getMobileService() {
		return mobileService;
	}

	public void setMobileService(MobileService mobileService) {
		this.mobileService = mobileService;
	}

	public List<T_mobile> getMobileList() {
		return mobileList;
	}

	public void setMobileList(List<T_mobile> mobileList) {
		this.mobileList = mobileList;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getMobilenumber() {
		return mobilenumber;
	}

	public void setMobilenumber(String mobilenumber) {
		this.mobilenumber = mobilenumber;
	}

	public void setMobile(T_mobile mobile) {
		this.mobile = mobile;
	}

}
